<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
    <div class="container">
        <a class="navbar-brand" href="${pageContext.request.contextPath}/article/index/1">
            <i class="fas fa-blog mr-2"></i>科技博客
        </a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav mr-auto">
                <c:forEach items="${categories}" var="cate">
                    <li class="nav-item active">
                        <a class="nav-link" href="#${cate.id}">
                                ${cate.name}
                            <span class="sr-only">(current)</span>
                        </a>
                    </li>
                </c:forEach>
                <!-- <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">
                        分类
                    </a>
                    <div class="dropdown-menu">
                        <a class="dropdown-item" href="#">前端开发</a>
                        <a class="dropdown-item" href="#">后端开发</a>
                        <a class="dropdown-item" href="#">人工智能</a>
                        <a class="dropdown-item" href="#">数据科学</a>
                    </div>
                </li> -->
            </ul>
            <form class="form-inline my-2 my-lg-0" action="${pageContext.request.contextPath}/article/publish">
                <%--                <input class="form-control mr-sm-2" type="search" placeholder="搜索文章...">--%>
                <button class="btn btn-outline-light my-2 my-sm-0" type="submit">发布博客</button>
            </form>
        </div>
    </div>
</nav>

